<?php
    #-------------------------------------------------------------#
	# This file is part of the Kumomado - Virtual Window Platform #
	# for PHP. (c) 2009 Tsai, Min Che <tirme0812@gmail.com>       #
	# Please visit http://www.kumomado.org/ for more information. #
	#                                                             #
	# This software is licensed under the GNU License v3. Please  #
	# view the LICENSE file for the full text of this license.    #
    #-------------------------------------------------------------#

	Kumomado::load('Kui.KumomadoAbstractContainer');
	/**
	 * @package libraries/kui/containers/frame/
	 * @author Tsai, Min Che
	 * @version 1.0
	 */
	class KumomadoFrame extends KumomadoAbstractContainer {
		protected $kuis = array();
		public function __construct($id = null) {
			parent::__construct();
			if (!isset($id)) {
				$id = 'frame1';
			}
			$this->setId($id);
		}
		public function add(KumomadoUserInterface $kui) {
			$this->kuis[$kui->getId()] = $kui;
		}
		public function view() {
			
		}
		public function render() {
			foreach ($this->kuis as $key => $kui) {
				$kui->render();
			}
			return array('Kui' => $this->KuiClient->render());
		}
	}